package cn.smxy.vo;

import cn.smxy.pojo.Comment;
import lombok.Data;
import lombok.NoArgsConstructor;

import java.util.ArrayList;
import java.util.List;

@Data
@NoArgsConstructor
public class CommentVo extends Comment {

    private List<CommentVo> child;
    private String userName;
    private String userPhoto;

    public CommentVo(Comment comment) {
        super(comment.getCommentId(),comment.getCommentContent(),
                comment.getPlantId(),comment.getParentId(),
                comment.getRootId(),comment.getCreateTime(),
                comment.getUserId());
        child = new ArrayList<>();
    }

}
